function sendChart() {

    $.ajax({
        url:".",
        type: "POST",
        dataType: "text",
        success: onReceive,
        data: $("#newxml").val(),
        error: function (){ alert("Connection error"); }
    });

} // sendChart

function onReceive(data) {
    $("#chart").html(data);
} // onReceive

